#ifndef UDPSEND_H
#define UDPSEND_H


//UdpSend.h
#include <QtNetwork/QUdpSocket>

class UdpSender : public QObject
{
    Q_OBJECT
public:
    UdpSender();
    ~UdpSender();
    // 设置发送ip和端口
    void initSender(QString desHost, int port);
    // 发送数据
    void send(QByteArray msg);

public slots:
    void recMsg(QByteArray msgInfo);
private:
    QUdpSocket *m_Socket = NULL;
    QString m_address;
    int m_port;
};

#endif // UDPSEND_H
